 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
	<meta http-equiv="Cache-Control" content="No-Cache">
	<meta http-equiv="Pragma" content="No-Cache">

	<title>운세의 신</title>

	<link rel="stylesheet" type="text/css" href="/css/common.css">
	
	<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"></script>
	<script src="/js/utility/common_util.js" type="text/javascript"></script>
	<script type="text/javascript">
		
		$(document).ready(function() {
			
			// 제목 입력 안내 메세지
			var subject_msg = "제목을 입력하세요.";
			$("#subject").val(subject_msg);
			$("#subject").bind({
				focus: function() {
					if( $(this).val() == subject_msg ) {
						$(this).val('');
					}
				},
				blur: function() {
					if( $(this).val() == '') {
						$(this).val(subject_msg);
					}
				}
			});
			
			$("#frm").submit(function() {
				var subject = $("#subject").val();
				if (subject == '' || subject == subject_msg) {
					alert('제목을 입력하세요.');
					$("#subject").focus();
					return false;
				} else if ($("#artist_idx").val() == '') {
					alert('스타idx를 입력하세요.');
					return false;
				}
			});
		});

		// 스타 검색 팝업
		function openStarSearch() {
			openPopup("/star/starpt/search", 500, 430);
		}

	</script>
</head>
<body>

<div id="wrap">
	<!-- Header -->
	<? include_once $_SERVER['DOCUMENT_ROOT'].'/include/commons/header.php'; ?>
	<!--// Header -->
    
    <!--컨텐츠-->
	<div>
		<h3>사진으로 보는 스타 운세</h3>
		<!--게시판-->
		<div>
			<form name="frm" id="frm" method="post" enctype="multipart/form-data" action="/star/starpt/write_ok">
				<fieldset>
					<legend>글쓰기</legend>
					<table width="100%" summary="글쓰기" cellpadding="0" cellspacing="0">
						<colgroup>
							<col width="140" />
							<col width="*" />
						</colgroup>
						<tbody>
							<tr class="write">
								<th scope="row" class="writer">작성자</th>
								<td><?=$sess_userinfo['nickname']?></td>
							</tr>
                            <tr>
								<th scope="row" class="tle">제목</th>
								<td>
									<input type="text" name="subject" id="subject" size="100" maxlength="100" />
								</td>
							</tr>
                            <tr>
								<th scope="row" class="tle">스타idx</th>
								<td>
									<input type="text" name="artist_idx" id="artist_idx" size="5" maxlength="5" />
									<span><a href="javascript:;" onclick="openStarSearch()">스타찾기</a></span>
								</td>
							</tr>
							<tr>
								<th scope="row" class="tle">파일첨부</th>
								<td>
									<span class="text">
										첨부파일은 JPG, GIF 이미지 파일만 등록 가능합니다.<br />
				   						용량은 1MB이하, 해상도는 가로 1920, 세로 1080 픽셀만 등록 가능합니다.
				   					</span><br/>
									썸네일 : <input type="file" name="userfile[]" /><br/>
									사진 1 : <input type="file" name="userfile[]" /><br/>
									사진 2 : <input type="file" name="userfile[]" /><br/>
									사진 3 : <input type="file" name="userfile[]" /><br/>
									사진 4 : <input type="file" name="userfile[]" /><br/>
								</td>
							</tr>
							<tr>
								<th scope="row" class="tle end">하단 내용</th>
								<td class="con end">
									<textarea name="content" id="comment" style="width: 600px; height: 300px">&lt;이미지 = 스포츠조선 제공&gt;</textarea>
								</td>
							</tr>
						</tbody>
						<tfoot>
							<tr>
								<td colspan="2" class="boardbt_area">
									<input type="submit" alt="등록하기" />
								</td>
							</tr>
						</tfoot>
					</table>
				</fieldset>
			</form>
		</div>
	</div>
	<!--컨텐츠-->
	
	

	<!-- Footer -->
	<? include_once $_SERVER['DOCUMENT_ROOT'].'/include/commons/footer.php'; ?>
	<!--// Footer -->
</div>
</body>
</html>